package com.ktjy.market.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktjy.market.mapper.DataDictionaryMapper;
import com.ktjy.market.pojo.DataDictionary;
import com.ktjy.market.service.DataDictionaryService;

import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 秦羽墨
* @description 针对表【data_dictionary】的数据库操作Service实现
* @createDate 2024-05-13 17:14:35
*/
@Service
public class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper, DataDictionary>
    implements DataDictionaryService {

    @Override
    public List<DataDictionary> UserListById(Long id) {
        QueryWrapper<DataDictionary>wrapper=new QueryWrapper<DataDictionary>()
                .eq("createdBy",id)
                .eq("typeCode","PUBLISH_STATUS");
        return baseMapper.selectList(wrapper);
    }

    @Override
    public List<DataDictionary> UserListByFlatFormId(Long id) {
        QueryWrapper<DataDictionary>wrapper=new QueryWrapper<DataDictionary>()
                .eq("createdBy",id)
                .eq("typeCode","APP_FLATFORM");
        return baseMapper.selectList(wrapper);
    }
}




